package com.yudean.esb.domain.erp;

import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by zenghui on 2015-05-19.
 * desc: Mapper to IDS_INS_Danger_Int
 */
public class ErpIdsInsDangerInt implements Serializable {
    private static final String TAG = "ErpIdsInsDangerInt";
    private String compCode; // Comp_Code	VARCHAR2(40)	NOT NULL	公司代码
    private String insNum; // 保单编码   VARCHAR2(100) Not NUll 取代insNumber作为唯一标识
    private String insNumber; // Ins_Number	Varchar2(100)	Not Null	保单号
    private String endorSementNum; // ENDORSEMENT_NUM	Varchar2(100)		批单号
    private Date dangerDate; // Danger_DATE	DATE	Not NULL	出险日期
    private String insSubject; // Ins_Subject	Varchar2(100)		出险标的
    private BigDecimal estimateAmount; // ESTIMATE_AMOUNT	Number		确认赔付金额
    private String insReason; // Ins_Reason	Varchar2(200)		出险原因
    private String closeType; // Close_type	Varchar2(100)		结案类型
    private String closeResult; // Close_result	Varchar2(500)		结案结果
    private String processStatus; // Process_status	Varchar2(10)		处理状态	U、S

    public String getFillingNum() {
        return fillingNum;
    }

    public void setFillingNum(String fillingNum) {
        this.fillingNum = fillingNum;
    }

    private String fillingNum; // Filing_num	Varchar2(50)		立案号
    private Date creationDate; // Creation_Date	DATE	Not null	记录创建日期
    private BigDecimal createdBy; // Created_By	NUMBER	Not NULL	创建者ID, 缺省为：-1
    private Date lastUpdateDate; // Last_Update_Date	DATE	Not NULL	本条记录最后更新日期
    private BigDecimal lastUpdatedBy; // Last_Updated_By	NUMBER	NOT NULL	本条记录最后更新者ID
    private String attribute1; // Attribute1	VARCHAR2(240)
    private String attribute2; // Attribute2	VARCHAR2(240)
    private String attribute3; // Attribute3	VARCHAR2(240)
    private String attribute4; // Attribute4	VARCHAR2(240)
    private String attribute5; // Attribute5	VARCHAR2(240)
    private String attribute6; // Attribute6	VARCHAR2(240)
    private String attribute7; // Attribute7	VARCHAR2(240)
    private String attribute8; // Attribute8	VARCHAR2(240)
    private String attribute9; // Attribute9	VARCHAR2(240)
    private String attribute10; // Attribute10	VARCHAR2(240)
    private BigDecimal advanceAmount; // Advance_amount	Number		预赔金额

    public BigDecimal getAdvanceAmount() {
        return advanceAmount;
    }

    public void setAdvanceAmount(BigDecimal advanceAmount) {
        this.advanceAmount = advanceAmount;
    }
    public String getInsNum() {
        return insNum;
    }

    public void setInsNum(String insNum) {
        this.insNum = insNum;
    }
    public String getCompCode() {
        return compCode;
    }

    public void setCompCode(String compCode) {
        this.compCode = compCode;
    }

    public String getInsNumber() {
        return insNumber;
    }

    public void setInsNumber(String insNumber) {
        this.insNumber = insNumber;
    }

    public String getEndorSementNum() {
        return endorSementNum;
    }

    public void setEndorSementNum(String endorSementNum) {
        this.endorSementNum = endorSementNum;
    }

    public Date getDangerDate() {
        return dangerDate;
    }

    public void setDangerDate(Date dangerDate) {
        this.dangerDate = dangerDate;
    }

    public String getInsSubject() {
        return insSubject;
    }

    public void setInsSubject(String insSubject) {
        this.insSubject = insSubject;
    }

    public BigDecimal getEstimateAmount() {
        return estimateAmount;
    }

    public void setEstimateAmount(BigDecimal estimateAmount) {
        this.estimateAmount = estimateAmount;
    }

    public String getInsReason() {
        return insReason;
    }

    public void setInsReason(String insReason) {
        this.insReason = insReason;
    }

    public String getCloseType() {
        return closeType;
    }

    public void setCloseType(String closeType) {
        this.closeType = closeType;
    }

    public String getCloseResult() {
        return closeResult;
    }

    public void setCloseResult(String closeResult) {
        this.closeResult = closeResult;
    }

    public String getProcessStatus() {
        return processStatus;
    }

    public void setProcessStatus(String processStatus) {
        this.processStatus = processStatus;
    }

    public Date getCreationDate() {
        return creationDate;
    }

    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }

    public BigDecimal getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(BigDecimal createdBy) {
        this.createdBy = createdBy;
    }

    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    public BigDecimal getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public void setLastUpdatedBy(BigDecimal lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public String getAttribute1() {
        return attribute1;
    }

    public void setAttribute1(String attribute1) {
        this.attribute1 = attribute1;
    }

    public String getAttribute2() {
        return attribute2;
    }

    public void setAttribute2(String attribute2) {
        this.attribute2 = attribute2;
    }

    public String getAttribute3() {
        return attribute3;
    }

    public void setAttribute3(String attribute3) {
        this.attribute3 = attribute3;
    }

    public String getAttribute4() {
        return attribute4;
    }

    public void setAttribute4(String attribute4) {
        this.attribute4 = attribute4;
    }

    public String getAttribute5() {
        return attribute5;
    }

    public void setAttribute5(String attribute5) {
        this.attribute5 = attribute5;
    }

    public String getAttribute6() {
        return attribute6;
    }

    public void setAttribute6(String attribute6) {
        this.attribute6 = attribute6;
    }

    public String getAttribute7() {
        return attribute7;
    }

    public void setAttribute7(String attribute7) {
        this.attribute7 = attribute7;
    }

    public String getAttribute8() {
        return attribute8;
    }

    public void setAttribute8(String attribute8) {
        this.attribute8 = attribute8;
    }

    public String getAttribute9() {
        return attribute9;
    }

    public void setAttribute9(String attribute9) {
        this.attribute9 = attribute9;
    }

    public String getAttribute10() {
        return attribute10;
    }

    public void setAttribute10(String attribute10) {
        this.attribute10 = attribute10;
    }

    @Override
    public String toString() {
        return "ErpIdsInsDangerInt{" +
                "compCode='" + compCode + '\'' +
                "insNum='" + insNum + '\'' +
                ", insNumber='" + insNumber + '\'' +
                ", endorSementNum='" + endorSementNum + '\'' +
                ", dangerDate=" + dangerDate +
                ", insSubject='" + insSubject + '\'' +
                ", estimateAmount=" + estimateAmount +
                ", insReason='" + insReason + '\'' +
                ", closeType='" + closeType + '\'' +
                ", closeResult='" + closeResult + '\'' +
                ", processStatus='" + processStatus + '\'' +
                ", fillingNum='" + fillingNum + '\'' +
                ", creationDate=" + creationDate +
                ", createdBy=" + createdBy +
                ", lastUpdateDate=" + lastUpdateDate +
                ", lastUpdatedBy=" + lastUpdatedBy +
                ", attribute1='" + attribute1 + '\'' +
                ", attribute2='" + attribute2 + '\'' +
                ", attribute3='" + attribute3 + '\'' +
                ", attribute4='" + attribute4 + '\'' +
                ", attribute5='" + attribute5 + '\'' +
                ", attribute6='" + attribute6 + '\'' +
                ", attribute7='" + attribute7 + '\'' +
                ", attribute8='" + attribute8 + '\'' +
                ", attribute9='" + attribute9 + '\'' +
                ", attribute10='" + attribute10 + '\'' +
                ", advanceAmount=" + advanceAmount +
                '}';
    }

    public boolean validateNull() {
        // 验证数据库非空字段
        if (StringUtils.isBlank(this.compCode)) {
            return false;
        }
        if (StringUtils.isBlank(this.insNum)) {
            return false;
        }
        if (StringUtils.isBlank(this.insNumber)) {
            return false;
        }
        if (null == this.dangerDate) {
            return false;
        }
        if (null == this.creationDate) {
            return false;
        }
        if (null == this.createdBy) {
            return false;
        }
        if (null == this.lastUpdateDate) {
            return false;
        }
        if (null == this.lastUpdatedBy) {
            return false;
        }
        return true;

    }

}
